﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LikeTry.Logic;

namespace LikeTry
{
    public partial class regUser : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            var code = this.txtRegid.Text;
            if (!string.IsNullOrEmpty(code))
            {
                if (UserOper.ValidationRegCode(code.Trim()))
                {
                    ////Add new user into DB

                }
                else
                {
                    ////
                    this.RegisterClientScriptBlock("invalidCode", "<script>alert('无效的推荐码!')</script>");
                }
            }
        }
    }
}